<div class="span10">
	<?=$system_message;?>
	<?=validation_errors() !=='' ? '<div class="alert alert-error">'.validation_errors().'</div>' : NULL;?>
	<fieldset>
	<legend>Add Position to <?=$department->department_name;?></legend>
	<form class="form-horizontal" action="<?=site_url('department/positions/'.$deptartment_id);?>" method="POST">
		<div class="control-group">
			<label class="control-label" for="inputEmail">Name of Position</label>
			<div class="controls">
			<input type="text" name="name" class="span5" placeholder="Name of Position" value="<?=set_value('name');?>" required>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="inputEmail">Position Desc</label>
			<div class="controls">
			<textarea name="description" class="span5" placeholder="position description"><?=set_value('description');?></textarea>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="inputEmail"></label>
			<div class="controls">
			<input type="submit" name="add_position" value="Add Position" class="btn btn-primary">
			<input type="reset"  value="reset" class="btn btn-primary btn-mini btn-danger">
			</div>
		</div>
	</form>
	</fieldset>
	
	<fieldset>
		<legend>Available Positions</legend>
		<?if(!empty($positions)):?>
			<table class="table table-bordered table-striped">
				<thead>
					<th>Position Name</th>
					<th>Department</th>
				</thead>
				<tbody>
					<?foreach($positions as $p):?>
						<tr>
							<td><?=$p->position_name;?></td>
							<td><?=$p->department_name;?></td>
							<td>
								<a href="<?=site_url('department/delete/'.$p->id);?>" title="delete entry" class="btn btn-mini btn-danger"><i class=" icon-remove icon-white"></i></a>
								<a href="<?=site_url('department/positions/'.$p->id);?>" title="Add Positions" class="btn btn-mini btn-primary"><i class="icon-user icon-white"></i></a>
							</td>
							
						</tr>
					<?endforeach;?>
				</tbody>
			</table>
		<?else:?>
			<div class="alert">
				Sorry, There are no current positions to show.
			</div>
		<?endif;?>
	</fieldset>
</div>